class ProducesController < ApplicationController

	#There have admin and user actions

	#For Admin
		def list
			@produces = Produce.order("produces.name ASC")
		end

		def show
			@produce = Produce.find(params[:id])
		end

		def new
			@produce = Produce.new
		end

		def create
			@produce = Produce.new(params[:produce])

		  	if @produce.save
		  		redirect_to(:action => 'list')
		  	else
		  		render('new')
		  	end
		end
	#End for Admin

end
